<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      size="small"
      :inline="true"
      label-width="68px"
    >
      <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQueryAll"
          >刷新</el-button
        >
        <el-select
          v-model="queryParams.typeid"
          placeholder="类型"
          style="width: 150px"
          @change="handleQueryTj"
        >
          <el-option label="竞彩" value="raceList" />
          <el-option label="足彩" value="raceListZc" />
          <el-option label="单场" value="raceListDc" />
        </el-select>
      </el-form-item>
    </el-form>

    <el-table v-loading="loading" :data="roleList">
    <!--
      <el-table-column label="" prop="index" width="40">
        <template slot-scope="scope">
          {{scope.$index+1}}
        </template>
      </el-table-column>
      <el-table-column label="编号" prop="id" width="80">
        <template slot-scope="scope">
          <el-button size="mini" type="text" @click="handleUpdate(scope.row)">{{
            scope.row.id
          }}</el-button>
        </template>
      </el-table-column>
       -->
      <el-table-column
        label="时间"
        prop="time"
        :show-overflow-tooltip="true"
        width="90"
      >        <template slot-scope="scope">
          <div
            :style="{
              color:
                scope.row.living == '0'
                  ? 'green'
                  : scope.row.living == '4'
                  ? 'red'
                  : 'blue',
            }"
          >
            {{ scope.row.time}}
          </div>
        </template>
		</el-table-column>
      <el-table-column
        label="名称"
        prop=""
        :show-overflow-tooltip="true"
        width="140"
      >
      <template slot-scope="scope">
       		<div>{{ scope.row.name}}</div>
       		<div>{{ scope.row.lname}}</div>
            <div>{{ scope.row.rname}}</div>
        </template>
       </el-table-column>
      <el-table-column
        label="赔率始末"
        prop=""
        :show-overflow-tooltip="true"
        width="350"
      > <template slot-scope="scope">
       		<div>亚：{{ scope.row.realTime.begas }}---{{ scope.row.realTime.endas }}</div>
            <div>欧：{{ scope.row.realTime.beges }}---{{ scope.row.realTime.endes }}</div>
            <div>大：{{ scope.row.realTime.begbig }}---{{ scope.row.realTime.endbig }}</div>
        </template>
      </el-table-column>
      <el-table-column
        label="赔率/凯利"
        prop=""
        :show-overflow-tooltip="true"
        width="350"
      > <template slot-scope="scope">
       		<div>降低数量：{{ scope.row.statusEntity.wnumlt }}-{{ scope.row.statusEntity.dnumlt }}-{{ scope.row.statusEntity.lnumlt }}/{{ scope.row.statusEntity.allnum }}</div>
            <div>超标数量：{{ scope.row.statusEntity.klwnum }}-{{ scope.row.statusEntity.kldnum }}-{{ scope.row.statusEntity.kllnum }}</div>
            <div>威廉盘口：{{ scope.row.statusEntity.bwklwl }}-{{ scope.row.statusEntity.bdklwl }}-{{ scope.row.statusEntity.blklwl }} | {{ scope.row.statusEntity.ewklwl }}{{ scope.row.statusEntity.edklwl }}-{{ scope.row.statusEntity.elklwl }}</div>
        </template>
      </el-table-column>
      <el-table-column
        label="BetFlag"
        prop=""
        :show-overflow-tooltip="true"
        width="140"
      > <template slot-scope="scope">
      		<div>WLLB:{{ scope.row.statusEntity.wllb }}</div>
            <div style="white-space:pre-wrap;">{{scope.row.statusEntity.betflag}}</div>
        </template>
      </el-table-column>
      <el-table-column
        label="热度"
        prop=""
        :show-overflow-tooltip="true"
        width="220"
      >   <template slot-scope="scope">
            <el-button
              size="mini"
              type="text"
              @click="open500(scope.row)"
              >热度</el-button
            >
            <div>{{ scope.row.touzhuEntity.gm }}</div>
            <div>{{ scope.row.touzhuEntity.qx }}</div>
            <div>交易赔率：{{ scope.row.touzhuEntity.win }}--{{ scope.row.touzhuEntity.draw }}--{{ scope.row.touzhuEntity.lose }}</div>
            <div>赔率概率：{{ scope.row.touzhuEntity.pwin }}--{{ scope.row.touzhuEntity.pdraw }}--{{ scope.row.touzhuEntity.plose }}</div>
            <div>必发概率：{{ scope.row.touzhuEntity.bfwin }}--{{ scope.row.touzhuEntity.bfdraw }}--{{ scope.row.touzhuEntity.bflose }}</div>
            <div>必发大额：{{ scope.row.touzhuEntity.bigwin }}--{{ scope.row.touzhuEntity.bigdraw }}--{{ scope.row.touzhuEntity.biglose }}</div>
          </template>
      </el-table-column>
      <el-table-column
        label="个人观点"
        prop=""
        :show-overflow-tooltip="true"
        width="220"
      >   <template slot-scope="scope">
              <el-button
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="handleUpdate(scope.row)"
              >修改</el-button>
 				<div style="white-space:pre-wrap;">{{ scope.row.setEntity.content }}</div>
          </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import { listsamehis } from "@/api/tool/card";
export default {
  name: "Astest",
  data() {
    return {
      // 遮罩层
      loading: true,
      listloading: true,
      // 表格数据
      roleList: [],
      // 弹出层标题
      title: "个人备注",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        id: undefined,
        typeid: "raceList",
        comp:"0",
        history:""
      }
    };
  },
  created() {
 	const id = this.$route.params && this.$route.params.id;
    if (id) {
      this.queryParams.id = id;
      this.getList();
    }
  },
  methods: {
    /** 查询角色列表 */
    getList() {
      this.loading = true;
      console.info(this.queryParams);
      listsamehis(this.queryParams).then((response) => {
        this.roleList = response;
        this.loading = false;
      });
    },
    handleQueryAll() {
      this.getList();
    },
    handleQueryTj(value) {
      this.queryParams.typeid = value;
      this.getList();
    },
    open500(row) {
      window.open('https://odds.500.com/fenxi/touzhu-'+row.id+'.shtml'); // 在新标签页中打开百度网页
    }
  },
};
</script>
<style scoped>
.cresult{
white-space:pre-wrap;
word-break:break-word;
}
</style>
